//
//  HMEmotion.swift
//  EmotionKeybaord
//
//  Created by ZhuDong on 16/5/31.
//  Copyright © 2016年 itcast. All rights reserved.
//

import UIKit

class HMEmotion: NSObject {
    var id: String?
    
    var chs: String?
    /*
     var png: String? {
     didSet {
     imagePath = NSBundle.mainBundle().bundlePath + "/Emoticons.bundle/" + "\(id ?? "")/" + "\(png ?? "")"
     }
     }
     */
    var png: String?{
        didSet {
            self.imagePath = NSBundle.mainBundle().bundlePath + "/Emoticons.bundle/" + "\(id ?? "")/" + "\(png ?? "")"
        }

    }
    var imagePath: String?
    init(id:String,dict:[String:AnyObject]) {
        self.id = id
        super.init()
        self.setValuesForKeysWithDictionary(dict)

    }
    var isDelete: Bool = false
    init(isDelete: Bool) {
        self.isDelete = isDelete
        super.init()
    }
    var isEmpty: Bool = false
    init(isEmpty: Bool) {
        self.isEmpty = isEmpty
        super.init()
    }
    var code: String?{
        didSet{
            self.emoji = code?.getEmojiWithHexString()
        }
    }
    var emoji: String?
    override func setValue(value: AnyObject?, forUndefinedKey key: String) {
        //
    }
}
